package sessions;

import entities.Admin;
import entities.User;
import entities.userstate.AwaitingApprovalUser;
import entities.userstate.CancelledUser;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Trabalho PD - 2014/2015
 * @author a21210380 a21210392
 */
public interface IUserAccountSession {
    public boolean login(String userName, String password);
    public boolean logout();
    public boolean registerUser(String username, String password, String name, int identityNumber, String email, int idCountry, int idAddress, String welcomeMessage, int numberOfSeats, String plateNUmber, String brand, int year);
    public boolean editUser(String password, String name, int identityNumber, String email, int idCountry, int idAddress);
    public boolean editAdmin(String password, String name, int identityNumber, String email);
    public Admin getAdmin();
    public User getUser();
    public CancelledUser isCancelled();
    public AwaitingApprovalUser isWaitingAdminReview();
    public boolean isVisitor();
    public boolean cancelAccount(String message);
    public boolean activateWaitingAccount(int user_id);
    public boolean activateCancelledAccount(int user_id);
    public boolean requestCancelledAccountReactivation();
    public boolean deleteCar(int car_id);
    public int createCar(int numberSeats, String plateNumber, String brand, int year);
    public boolean editCar(int car_id, int numberSeats, String plateNumber, String brand, int year);
    public boolean createTrip(Date departueDate, Date arrivalDate, String description, int id_car, int id_starting_country, int id_starting_address, int id_ending_country, int id_ending_address);
    public boolean createAddress(String countryName, String address, String lat, String lng);
    public int createTopic(String title, String message);
    //public boolean deleteTopic(int topic_id);
    public int post(int topic_id, String message);
    public int sendEmail(int user_id, String title, String message);
    public boolean evaluate(int id_trip, Map<String, Integer> driver, Map<String, Integer> car, Map<Integer, Map<String, Integer>> passengers);
    public boolean joinTrip(int id_trip);
    public boolean acceptUserInTrip(int id_trip, int user_id);
}
